﻿
'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_DiskLogical
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_logicalDiskLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "

    Private m_logicalDiskKey As Integer
    Private m_logicalDiskCompKey As Integer
    Private m_logicalDiskVirtualHostKey As Integer
    Private m_logicalDiskDeviceId As String
    Private m_logicalDiskDescription As String
    Private m_logicalDiskDeviceType As Integer
    Private m_logicalDiskFileSystem As String
    Private m_logicalDiskFreeSpace As Int64
    Private m_logicalDiskSize As Int64
    Private m_logicalDiskVolumeName As String
    Private m_logicalDiskVolumeSerial As String
    Private m_logicalDiskComment As String
    Private m_logicalDiskLastUpdate As Date
    Private m_logicalDiskLastEdit As String


    Private Const constLogicalDiskKey As Integer = -1
    Private Const constLogicalDiskCompKey As Integer = -1
    Private Const constLogicalDiskVirtualHostKey As Integer = -1
    Private Const constLogicalDiskDeviceId As String = "C:"
    Private Const constLogicalDiskDescription As String = "Local Fixed Disk"
    Private Const constLogicalDiskDeviceType As Integer = 3
    Private Const constLogicalDiskFileSystem As String = "NTFS"
    Private Const constLogicalDiskFreeSpace As Int64 = -1
    Private Const constLogicalDiskSize As Int64 = -1
    Private Const constLogicalDiskVolumeName As String = "na"
    Private Const constLogicalDiskVolumeSerial As String = "na"
    Private Const constLogicalDiskComment As String = "na"
    Private Const constLogicalDiskLastUpdate As Date = #1/1/2001#
    Private Const constLogicalDiskLastEdit As String = "na"

    Public Property logicalDiskKey() As Integer
        Get
            Return Me.m_logicalDiskKey
        End Get
        Set(ByVal value As Integer)
            Me.m_logicalDiskKey = value
            Me.OnPropertyChanged("logicalDiskKey")
        End Set
    End Property

    Public Property logicalDiskCompKey() As Integer
        Get
            Return Me.m_logicalDiskCompKey
        End Get
        Set(ByVal value As Integer)
            Me.m_logicalDiskCompKey = value
            Me.OnPropertyChanged("logicalDiskCompKey")
        End Set
    End Property

    Public Property logicalDiskVirtualHostKey() As Integer
        Get
            Return Me.m_logicalDiskVirtualHostKey
        End Get
        Set(ByVal value As Integer)
            Me.m_logicalDiskVirtualHostKey = value
            Me.OnPropertyChanged("logicalDiskVirtualHostKey")
        End Set
    End Property

    Public Property logicalDiskDeviceId() As String
        Get
            Return Me.m_logicalDiskDeviceId
        End Get
        Set(ByVal value As String)
            Me.m_logicalDiskDeviceId = value
            Me.OnPropertyChanged("logicalDiskDeviceId")
        End Set
    End Property

    Public Property logicalDiskDescription() As String
        Get
            Return Me.m_logicalDiskDescription
        End Get
        Set(ByVal value As String)
            Me.m_logicalDiskDescription = value
            Me.OnPropertyChanged("logicalDiskDiskDescription")
        End Set
    End Property

    Public Property logicalDiskDeviceType() As Integer
        Get
            Return Me.m_logicalDiskDeviceType
        End Get
        Set(ByVal value As Integer)
            Me.m_logicalDiskDeviceType = value
            Me.OnPropertyChanged("logicalDiskDeviceType")
        End Set
    End Property

    Public Property logicalDiskFileSystem() As String
        Get
            Return Me.m_logicalDiskFileSystem
        End Get
        Set(ByVal value As String)
            Me.m_logicalDiskFileSystem = value
            Me.OnPropertyChanged("logicalDiskFileSystem")
        End Set
    End Property

    Public Property logicalDiskFreeSpace() As Int64
        Get
            Return Me.m_logicalDiskFreeSpace
        End Get
        Set(ByVal value As Int64)
            Me.m_logicalDiskFreeSpace = value
            Me.OnPropertyChanged("logicalDiskFreeSpace")
        End Set
    End Property

    Public Property logicalDiskSize() As Int64
        Get
            Return Me.m_logicalDiskSize
        End Get
        Set(ByVal value As Int64)
            Me.m_logicalDiskSize = value
            Me.OnPropertyChanged("logicalDiskSize")
        End Set
    End Property

    Public Property logicalDiskVolumeName() As String
        Get
            Return Me.m_logicalDiskVolumeName
        End Get
        Set(ByVal value As String)
            Me.m_logicalDiskVolumeName = value
            Me.OnPropertyChanged("logicalDiskVolumeName")
        End Set
    End Property

    Public Property logicalDiskVolumeSerial() As String
        Get
            Return Me.m_logicalDiskVolumeSerial
        End Get
        Set(ByVal value As String)
            Me.m_logicalDiskVolumeSerial = value
            Me.OnPropertyChanged("logicalDiskVolumeSerial")
        End Set
    End Property

    Public Property logicalDiskComment() As String
        Get
            Return Me.m_logicalDiskComment
        End Get
        Set(ByVal value As String)
            Me.m_logicalDiskComment = value
            Me.OnPropertyChanged("logicalDiskComment")
        End Set
    End Property

    Public Property logicalDiskLastUpdate() As Date
        Get
            Return Me.m_logicalDiskLastUpdate
        End Get
        Set(ByVal value As Date)
            Me.m_logicalDiskLastUpdate = value
            Me.OnPropertyChanged("logicalDiskLastUpdate")
        End Set
    End Property

    Public Property logicalDiskLastEdit() As String
        Get
            Return Me.m_logicalDiskLastEdit
        End Get
        Set(ByVal value As String)
            Me.m_logicalDiskLastEdit = value
            Me.OnPropertyChanged("logicalDiskLastEdit")
        End Set
    End Property



#End Region

#Region " Methods "


    Public Sub initProperties()

        Try

            logicalDiskKey = constLogicalDiskKey
            logicalDiskCompKey = constLogicalDiskCompKey
            logicalDiskVirtualHostKey = constLogicalDiskVirtualHostKey
            logicalDiskDeviceId = constLogicalDiskDeviceId
            logicalDiskDescription = constLogicalDiskDescription
            logicalDiskFileSystem = constLogicalDiskFileSystem
            logicalDiskFreeSpace = constLogicalDiskFreeSpace
            logicalDiskSize = constLogicalDiskSize
            logicalDiskVolumeName = constLogicalDiskVolumeName
            logicalDiskVolumeSerial = constLogicalDiskVolumeSerial
            logicalDiskComment = constLogicalDiskComment
            logicalDiskLastUpdate = constLogicalDiskLastUpdate
            logicalDiskLastEdit = constLogicalDiskLastEdit



        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class



